#include <bits/stdc++.h>

using namespace std;
const int N=601;
int A[N][N],prefix_sum[N][N];
int main_68()
{
    int n,l,r,t;
    scanf("%d%d%d%d",&n,&l,&r,&t);
    memset(prefix_sum,0,sizeof(prefix_sum));
    for (int i=1;i<=n ;++i )
    {
        for (int j=1;j<=n ;++j )
        {
            scanf("%d",&A[i][j]);
            prefix_sum[i][j]=prefix_sum[i][j-1]+prefix_sum[i-1][j]-prefix_sum[i-1][j-1]+A[i][j];
        }
    }
    int cnt=0;
    for (int i=1;i<=n ;++i )
    {
        for (int j=1;j<=n ;++j )
        {
            int xrd=min(i+r,n),yrd=min(j+r,n);
            int xlu=max(i-r,1),ylu=max(j-r,1);
            int sum=prefix_sum[xrd][yrd]-prefix_sum[xrd][ylu-1]-prefix_sum[xlu-1][yrd]+prefix_sum[xlu-1][ylu-1];
            if (sum<=(xrd-xlu+1)*(yrd-ylu+1)*t)
            {
                ++cnt;
            }
        }
    }
    printf("%d",cnt);
    return 0;
}
